<br>
<div class="panel panel-default shadowed">
    <div class="panel-heading clearfix">
        <h2 class="panel-title pull-left">Users</h2>
        <div class="pull-right">
            <form class="form">
                <input type="text" class="form-control" ng-model="ac.searchUser" placeholder="Search...">
            </form>
        </div>
    </div>
    <div class="panel-body">
        <table class="table table-hover table-mouse-hover">
            <thead>
            <tr>
                <th>Username</th>
                <th>First Name</th>
                <th>Last Name</th>
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat="user in ac.users | filter: ac.searchUser" ng-click="ac.selectUser(user)">
                <td>{{user.username}}</td>
                <td>{{user.first_name}}</td>
                <td>{{user.last_name}}</td>
            </tr>
            </tbody>
        </table>
    </div>
</div>

<script type="text/ng-template" id="authorizeUser">
    <div class="modal fade">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <h4 class="modal-title" id="addProfileLabel">Authorize User</h4>
                </div>
                <div class="modal-body">
                    <form role="form">
                        <div class="row">
                            <div class="form-group col-md-4">
                                <label for="username">Username</label>
                                <input type="text" ng-model="auc.selectedUser.username" class="form-control" id="username" ng-disabled="true">
                            </div>
                            <div class="form-group col-md-4">
                                <label for="role">Role</label>
                                <select class="form-control" ng-model="auc.selectedUser.role" id="role">
                                    <option style="display:none" value="">Select role</option>
                                    <option value="0">Admin</option>
                                    <option value="1">Manager</option>
                                    <option value="2">Salesman</option>
                                </select>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-warning" data-dismiss="modal" ng-click="auc.close('none')">
                        <span class="fa fa-close"> Cancel</span>
                    </button>
                    <button type="button" class="btn btn-success" data-dismiss="modal" ng-click="auc.close('update')">
                        <span class="fa fa-check"> Authorize</span>
                    </button>
                </div>
            </div>
        </div>
    </div>
</script>